#ifndef _WORKER_H_
#define _WORKER_H_

#include "EventProcessor.h"
#include "EventProcessorImp.h"
#include "Message.h"
#include <vector>

using namespace std;

class WorkerImp : public EventProcessorImp {
	private:

		vector<int> work;	
		
		EventProcessor Master;
		
	public:
		WorkerImp(EventProcessor& _master, vector<int> _work);  
	
		void SendTheSum();	


		MESSAGE_HANDLER_DECLARATION(Die);

};

// Interface class
class Worker : public EventProcessor {
 public:
  Worker(EventProcessor& _controller, vector<int> _work);
};

inline Worker::Worker(EventProcessor& _controller, vector<int> _work){
  evProc = new WorkerImp(_controller,_work);
}

#endif 
